<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//auth 中间件用途，用户没登录则跳转到登录页面
Route::get('/',"Web\AppController@getApp")->middleware('auth');
//guest 中间件,该中间件的用途是登录用户访问该路由会跳转到指定认证页面 ,而非登录用户访问才会显示登录页面
Route::get('/login','Web\AppController@getLogin')->name('login')->middleware('guest');


//{social} 参数代表 使用oAuth提供方,比如我们使用的github,social会根据这个参数值区config/services.php中获取对应的OAuth配置信息
Route::get('/auth/{social}','Web\AuthenticationController@getSocialRedirect')->middleware('guest');
Route::get('/auth/{social}/callback','Web\AuthenticationController@getSocialCallback')->middleware('guest');
